package com.dgl.sdk.view;



import com.dgl.sdk.R;

import android.content.Context;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.EditText;

public class WidgetAnim {
	private static Animation animation ;
	
	public static void StartLRAnim(Context context, EditText widget){
		animation = AnimationUtils.loadAnimation(context, R.anim.anim_right_left);
		widget.setHint("不能为空!");
		widget.startAnimation(animation);
	}
	
	public static boolean checkIfEmpty(Context context, EditText widget){
		if(widget.getText().toString().equals("")){
			StartLRAnim(context,  widget);
			
			return true;
		}else{
			return false;
		}
	}
}

